@green: #24abb0;
@lightGreen: #24bfc4;
@orange: #ea6e24;
@lightOrange: #fb8029;
@middleGray: #888888;
@deepGray: #555555;
@lightGray: #fafafa;
@black: #111111;

.font {
    font-family: '思源黑体', '微软雅黑', tahoma, sans-serif;
}

.b-b-d {
    border-bottom: dashed 1px #f0f0f0;
}

.page {
    .font;
    flex-grow: 1;
    height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
}

#message {
    .font;

    .message-transition {
        position: fixed;
        left: 50%;
        top: 40%;
        z-index: 999999;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 4px;
        padding: 10px 15px;
        color: white;
        box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);

        transition: opacity .3s ease;
        opacity: 1;

    }

    .message-enter, .message-leave {
        opacity: 0;
    }

}

#modal {
    .font;

    .modal-shadow-transition {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 999997;
        background: rgba(0, 0, 0, 0.3);
        height: 100%;
        width: 100%;

        transition: opacity .3s ease;
        opacity: 1;

    }
    .modal-dialog-transition {
        position: fixed;
        left: 50%;
        top: 40%;
        z-index: 999998;
        background: white;
        border-radius: 4px;
        padding: 10px 15px;
        color: #111111;
        box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);

        transition: opacity .3s ease;
        opacity: 1;

    }

    .modal-shadow-enter, .modal-shadow-leave, .modal-dialog-enter, .modal-dialog-leave {
        opacity: 0;
    }

}

.conponent-item-course {
    .b-b-d;
    padding: 15px 15px 0 15px;

    h3 {
        display: inline-block;
        color: @deepGray;
        font-size: 18px;
        padding-bottom: 15px;
        cursor: pointer;

        &::after {
            content: '';
            display: block;
        }

        &:hover {
            color: @green;
        }
    }
    p {
        font-size: 12px;
        color: @middleGray;
        padding-bottom: 15px;
    }

    span {

        &.tag {
            color: @green;
        }

        &::after {
            content: '·';
            display: inline-block;
            padding: 0 5px;
        }

        &:last-child::after {
            content: '';
            display: none;
        }
    }

}

.conponent-item-homework {
    .b-b-d;
    padding: 15px 15px 0 15px;

    h3 {
        display: inline-block;
        color: @deepGray;
        font-size: 18px;
        padding-bottom: 15px;
        cursor: pointer;

        &::after {
            content: '';
            display: block;
        }

        &:hover {
            color: @green;
        }
    }
    p {
        font-size: 12px;
        color: @middleGray;
        padding-bottom: 15px;
    }

    span {

        &.is-push {
            color: @green;
        }
        &.not-push {
            color: @orange;
        }

        &::after {
            content: '·';
            display: inline-block;
            padding: 0 5px;
        }

        &:last-child::after {
            content: '';
            display: none;
        }
    }

}

.conponent-input {
    text-align: center;

    label {
        display: flex;
        margin: 10px auto 0 auto;
        width: 250px;
        height: 48px;
        border: solid 1px #eeeeee;

        div {
            width: 16px;
            height: 16px;
            margin: 16px;
            background: url("img/spit_input.png") no-repeat;
        }

        input {
            .font;
            border: none;
            height: 48px;
            width: 200px;
        }

        &.focus {
            border: solid 1px @green;
            box-shadow: 0 0 3px 0 fadein(@green, 80%);
        }
    }
}

.conponent-textarea {
    text-align: center;

    label {
        margin: 10px auto 0 auto;
        padding: 2px 8px;
        display: block;
        border: solid 1px #eeeeee;

        textarea {
            .font;
            font-size: 12px;
            border: none;
            line-height: 2em;
            width: 100%;
            resize: none;
            overflow: hidden;
        }

        &.focus {
            border: solid 1px @green;
            box-shadow: 0 0 3px 0 fadein(@green, 80%);
        }
    }
}

#app {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: row;
}

#banner {
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    background-position: center;
    background-size: cover;
    transition: width 0.3s;

    > div {
        .font;
        align-items: flex-end;
        color: white;
        padding: 20px;

        > h1 {
            font-size: 30px;
        }
        > h2 {
            font-size: 14px;
        }
        > p {
            font-size: 12px;
            font-weight: lighter;
            line-height: 14px;
            margin-top: 20px;
        }
    }
}

#SideNav {
    width: 50px;
    height: 100%;
    background: #202020;
    z-index: 500;
    display: flex;
    flex-direction: column;

    .icon {
        width: 20px;
        height: 20px;
        padding: 15px;
        cursor: pointer;
        opacity: 0.5;
        transition: all 0.3s;

        &:hover {
            opacity: 0.8;
        }

        &::after {
            content: '';
            display: block;
            width: 20px;
            height: 20px;
            background: url(img/spit_side_icon.png) no-repeat;
            background-size: 60px;
        }

        &#course::after {
            background-position: 0 0;
        }

        &#notice::after {
            background-position: -20px 0;
        }

        &#homework::after {
            background-position: -40px 0;
        }

        &.active {
            opacity: 1;
            background: @green;
        }
    }

    .placeholder {
        flex-grow: 1;
    }

    .log-out {
        width: 20px;
        height: 20px;
        padding: 15px;
        cursor: pointer;
        opacity: 0.5;
        transition: all 0.3s;

        &::after {
            content: '';
            display: block;
            width: 20px;
            height: 20px;
            background: url(img/ic_log_out.png) no-repeat;
        }

        &:hover {
            opacity: 0.8;
        }
    }

}

#homeworkList h1::before {
    content: '';
    display: inline-block;
    vertical-align: bottom;
    margin: 5px;
    width: 20px;
    height: 20px;
    background: url(img/spit_side_icon_black.png) no-repeat -40px 0;
    background-size: 60px;
    opacity: 0.5;
}

#courseList h1::before {
    content: '';
    display: inline-block;
    vertical-align: bottom;
    margin: 5px;
    width: 20px;
    height: 20px;
    background: url(img/spit_side_icon_black.png) no-repeat 0 0;
    background-size: 60px;
    opacity: 0.5;
}

#homeworkList, #courseList {
    .page;

    .title {
        padding: 10px;
        margin: 20px;
        .b-b-d;
        display: flex;
        flex-direction: row;

        .placeholder {
            flex-grow: 1;
        }

        h1 {
            font-size: 20px;
            color: @black;
        }

        .rank {
            color: @black;
        }

        span {

            transition: color 0.3s;
            cursor: pointer;

            color: @middleGray;

            &:hover {
                color: @lightGreen;
            }

            &.active {
                color: @green;
            }

            &::before {
                content: '·';
                padding: 4px 8px;
                color: @deepGray;
            }
        }

    }

    ul {
        margin: 0 20px;
    }

}

#courseDetail {
    .page;
    background: @lightGray;

    .float {
        position: fixed;
        right: 40px;
        top: 20px;
        padding: 8px;
        font-size: 12px;
        color: @middleGray;
        .b-b-d;
    }

    .fixed-top-bar-transition {
        line-height: 70px;
        padding: 0 15px;
        vertical-align: bottom;

        > div {
            max-width: 800px;
            margin: auto;

            h3 {
                color: @deepGray;
                font-size: 18px;
                display: inline-block;
            }

            p {
                display: inline-block;
                font-size: 12px;
                color: @middleGray;
            }

            span {

                &.tag {
                    color: @green;
                }

                &::after {
                    content: '·';
                    display: inline-block;
                    padding: 0 5px;
                }

                &:last-child::after {
                    content: '';
                    display: none;
                }
            }
        }
    }

    .body {
        padding: 15px;
        background: white;
        max-width: 800px;
        margin: auto;

        .title {
            padding-bottom: 15px;
            .b-b-d;

            h3 {
                color: @deepGray;
                font-size: 18px;
                padding-bottom: 15px;

            }
            p {
                font-size: 12px;
                color: @middleGray;
                padding-bottom: 15px;
            }

            span {

                &.tag {
                    color: @green;
                }

                &::after {
                    content: '·';
                    display: inline-block;
                    padding: 0 5px;
                }

                &:last-child::after {
                    content: '';
                    display: none;
                }
            }
        }

        .content {
            text-align: center;

            .article {
                margin: 30px 0;
                text-align: left;

                p {
                    min-height: 1em;
                }
            }

            img {
                display: block;
                margin: 20px auto 20px auto;
                max-width: 100%;
            }

            .attachments {
                text-align: left;

                h2 {
                    padding-bottom: 10px;

                    &::before {
                        content: '';
                        display: block;
                        margin-bottom: 10px;
                        .b-b-d;
                    }
                }

                div {
                    padding-left: 16px;

                    a {
                        display: inline-block;
                        font-size: 12px;
                        line-height: 20px;
                        color: @deepGray;

                        &:visited {
                            color: @deepGray;
                        }

                        &:hover {
                            color: @green;
                        }

                        &::before {
                            content: '';
                            display: block;
                            float: left;
                            width: 16px;
                            height: 16px;
                            margin: 2px;
                            background: url("img/spit_input.png") no-repeat -96px -16px;
                        }
                    }
                }
            }
        }

    }
}

#homeworkDetail {
    .page;
    background: @lightGray;

    .float {
        position: fixed;
        right: 40px;
        top: 20px;
        padding: 8px;
        font-size: 12px;
        color: @middleGray;
        .b-b-d;
    }

    .fixed-top-bar-transition {
        line-height: 70px;
        padding: 0 15px;
        vertical-align: bottom;

        > div {
            max-width: 800px;
            margin: auto;

            h3 {
                color: @deepGray;
                font-size: 18px;
                display: inline-block;
            }

            p {
                display: inline-block;
                font-size: 12px;
                color: @middleGray;
            }

            span {

                &.tag {
                    color: @green;
                }

                &::after {
                    content: '·';
                    display: inline-block;
                    padding: 0 5px;
                }

                &:last-child::after {
                    content: '';
                    display: none;
                }
            }
        }
    }

    .body {
        padding: 15px;
        background: white;
        max-width: 800px;
        margin: auto;

        .title {
            padding-bottom: 15px;
            .b-b-d;

            h3 {
                color: @deepGray;
                font-size: 18px;
                padding-bottom: 15px;
            }
            p {
                font-size: 12px;
                color: @middleGray;
                padding-bottom: 15px;
            }

            span {

                &.tag {
                    color: @green;
                }

                &::after {
                    content: '·';
                    display: inline-block;
                    padding: 0 5px;
                }

                &:last-child::after {
                    content: '';
                    display: none;
                }
            }

            .article {
                margin: 30px 0;
                text-align: left;

                p {
                    min-height: 1em;
                }
            }
        }

        .content {
            text-align: center;

            .upload-area {
                .b-b-d;
                text-align: left;
                padding: 12px;

                button {
                    .font;
                    cursor: pointer;
                    border: none;
                    display: block;
                    width: 100px;
                    height: 30px;
                    line-height: 30px;
                    color: white;
                    background: @green;
                    font-size: 14px;
                    text-align: center;

                    &[type=submit] {
                        margin-top: 12px;
                    }
                }

                table {
                    width: 100%;

                    tr {
                        border-top: dashed 1px #f6f6f6;
                        height: 40px;
                        line-height: 40px;
                    }

                    .file-name {
                        width: 60%;

                        > span {
                            color: @green;

                            &::before {
                                content: '';
                                display: inline-block;
                                width: 16px;
                                height: 16px;
                                margin-right: 6px;
                                background: url("img/spit_input.png") no-repeat -96px -16px;
                            }

                        }

                    }

                    .file-size {
                        width: 20%;

                    }

                    .file-delete {
                        width: 20%;
                        color: red;
                        text-decoration: underline;
                        cursor: pointer;

                        &:hover {
                            color: lighten(red, 20%);
                        }
                    }

                }
            }

            .no-push {
                padding: 12px;
            }

            .record {
                text-align: left;
                background: white;
                margin: 12px;
                box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
                padding: 12px;

                h4 {
                    font-size: 12px;
                    color: @middleGray;
                }

                .article {
                    margin: 12px 0;

                    p {
                        min-height: 1em;
                    }
                }

                .file {
                    color: @green;
                    &::before {
                        content: '';
                        display: inline-block;
                        width: 16px;
                        height: 16px;
                        margin-right: 6px;
                        background: url("img/spit_input.png") no-repeat -96px -16px;
                    }

                    > span {
                        display: inline-block;
                        padding-left: 4px;
                        color: @middleGray;
                        font-size: 0.8em;
                    }
                }

            }
        }

    }

}

#noticeList h1::before {
    content: '';
    display: inline-block;
    vertical-align: bottom;
    margin: 5px;
    width: 20px;
    height: 20px;
    background: url(img/spit_side_icon_black.png) no-repeat -20px 0;
    background-size: 60px;
    opacity: 0.5;
}

#noticeList {
    background: #fafafa;
    .page;

    .title {
        padding: 10px;
        margin: 20px;
        .b-b-d;
        display: flex;
        flex-direction: row;

        h1 {
            font-size: 20px;
            color: @black;
        }

        .rank {
            color: @black;
        }

    }

    li {
        display: block;
        background: white;
        margin-bottom: 20px;
        padding: 20px;

        h2 {
            font-size: 20px;
            .b-b-d;
            padding-bottom: 10px;
            margin-bottom: 10px;
        }

        p {
            font-size: 12px;
            min-height: 1.2em;
            color: @middleGray;
        }
    }

}

#login, #verify {
    .page;
    background: white;

    .top {
        div {
            background: url("img/title.png") no-repeat center 100%;
            width: 200px;
            height: 50px;
            margin: 120px auto 0 auto;
        }

        h2 {
            text-align: center;
            padding-top: 8px;
            font-weight: lighter;
            font-size: 18px;
            color: @green;
        }
    }

    .middle {
        padding-top: 20px;
        text-align: center;

        .tab-bar {
            display: inline-block;
            height: 30px;
            line-height: 30px;
            font-size: 20px;
            color: @middleGray;
            background: white;
            text-align: center;
            position: relative;
            top: 15px;
            padding: 0 30px;

            span {
                cursor: pointer;
                letter-spacing: 4px;

                &:hover {
                    color: @lightOrange;
                }

                &.active {
                    color: @orange;
                }
            }

            b {
                padding: 0 8px;
                font-weight: normal;
            }
        }

        .hr {
            max-width: 900px;
            margin: auto;
            padding: 0 40px;

            &::before {
                content: '';
                display: block;
                .b-b-d;
            }
        }

    }

    .bottom {
        padding-top: 30px;

        .login {

        }

        .verify {

            h4 {
                text-align: center;
                font-size: 14px;

                span {
                    color: @orange;
                }
            }
        }

        button {
            cursor: pointer;
            .font;
            border: none;
            display: block;
            width: 250px;
            height: 50px;
            line-height: 50px;
            color: white;
            background: @green;
            font-size: 14px;
            text-align: center;
            margin: 10px auto 0 auto;
        }
    }
}

ul {
    margin: 0 20px;
}